const birthdayTypeOptions = ['阳历', '农历',];
export default {
  el: 'app',
  data() {
    return {
      upkey: 0,
      divWidth: 0, // 初始宽度设置为0
      linkScr:'',
      isSearch: false,
      dataStatus:true,
      birthday: '',//生日
      birthTime: '',//出生时间
      timeDetailList: [{
        value: '0',
        label: '早子时(00:00~01:00)'
      }, {
        value: '1',
        label: '丑时(01:00~03:00)'
      }, {
        value: '2',
        label: '寅时(03:00~05:00)'
      }, {
        value: '3',
        label: '卯时(05:00~07:00)'
      }, {
        value: '4',
        label: '辰时(07:00~09:00)'
      },
      {
        value: '5',
        label: '巳时(09:00~11:00)'
      }, {
        value: '6',
        label: '午时(11:00~13:00)'
      }, {
        value: '7',
        label: '未时(13:00~15:00)'
      },
      {
        value: '8',
        label: '申时(15:00~17:00)'
      }, {
        value: '9',
        label: '酉时(17:00~19:00)'
      },
      {
        value: '10',
        label: '戌时(19:00~21:00)'
      }, {
        value: '11',
        label: '亥时(21:00~23:00)'
      }, {
        value: '12',
        label: '晚子时(23:00~00:00)'
      },
      ],//时间详情列表
      gender: 'male',//性别
      className: '',
      birthdayType: '阳历',//生日类型
      birthdays: birthdayTypeOptions,//生日类型列表
    }
  },
  watch: {
   
  },
  created() {
    document.documentElement.style.setProperty('--el-color-primary', '#531dab');
  },
  mounted() {
  // 获取屏幕宽度并赋值给 divWidth
  this.divWidth = window.innerWidth;
  },
  methods: {
    search(){
      // http://47.121.189.7:6006/iframe.html?viewMode=story&id=iztrolabe--iztrolabe&args=birthday:2024-9-20;birthTime:1;gender:male;birthdayType:lunar;isLeapMonth:!true
      console.log(12121);
      console.log(this.birthday,'生日');
      console.log(this.birthTime,'出生时间');
      console.log(this.className,'className');
      console.log(this.gender,'gender');
      this.linkScr = `http://47.121.189.7:6006/iframe.html?viewMode=story&id=iztrolabe--iztrolabe&args=birthday:${this.birthday};${this.birthTime != 0&&this.birthTime?'birthTime:'+this.birthTime+';':''}${this.gender == 'male'?'gender:male;':''}${this.birthdayType =='农历'? 'birthdayType:lunar;':''}`;
      // alert(this.linkScr);
      this.upkey++;
    }
   
  }

}
